package com.cjl.multi_thread.share_cooperate.lock;

public class GoodsInfo {
    private final String name;
    private double totalMoney;
    private int storeNumber;

    public GoodsInfo(String name, double totalMoney, int storeNumber) {
        this.name = name;
        this.totalMoney = totalMoney;
        this.storeNumber = storeNumber;
    }

    public double getTotalMoney() {
        return totalMoney;
    }

    public int getStoreNumber() {
        return storeNumber;
    }

    public void changeNumber(int num){
        this.totalMoney += num*25;
        this.storeNumber -= num;
    }
}
